//
//  ArenaViewController.m
//  CaiPiao
//
//  Created by zhoup on 16/5/24.
//  Copyright © 2016年 zhoup. All rights reserved.
//

#import "ArenaViewController.h"

@interface ArenaViewController ()
@property (weak, nonatomic) IBOutlet UISegmentedControl *titleSegment;

@end

@implementation ArenaViewController

- (void)viewDidLoad {
    [super viewDidLoad];
   
    [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"NLArenaNavBar64"] forBarMetrics:UIBarMetricsDefault];
    
    UIImage *backImage = [UIImage imageNamed:@"NLArenaBackground"];
    self.view.layer.contents = (__bridge id _Nullable)(backImage.CGImage);
    
//    [self.view setBackgroundColor:[UIColor colorWithPatternImage:backImage]];
    
    [self.titleSegment setBackgroundImage:[UIImage imageNamed:@"SegmentBgNormal"] forState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
    
    [self.titleSegment setBackgroundImage:[UIImage imageNamed:@"SegmentBgSelect"] forState:UIControlStateSelected  barMetrics:UIBarMetricsDefault];
    
    NSMutableDictionary *dict = [NSMutableDictionary dictionary];
    
    [dict setObject:[UIColor whiteColor] forKey:NSForegroundColorAttributeName];
    NSLog(@"%@",[UIFont familyNames]);
    
    [dict setValue:[UIFont fontWithName:@"Times New Roman" size:15.0] forKey:NSFontAttributeName];
    
    [self.titleSegment setTitleTextAttributes:dict forState:UIControlStateNormal];
    [self.titleSegment setTitleTextAttributes:dict forState:UIControlStateSelected];

}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
